package practice.w917;


public class ReplaceAllDemo {
    public static void main(String[] args) {
        String line = "abc123def456ghi";
        line = line.replaceAll("[0-9]+","#NUMBER#");
        System.out.println(line);
        String regex = "(gun|sb|fuck|sha)";
        String message = "你sb,gun吧!";
        message = message.replaceAll(regex,"***");
        System.out.println(message);


//        String line = "abc123def456ghi";
//        line = line.replaceAll("[0-9]+","#NUMBER#");
//        System.out.println(line);
//        String regex = "(gun|sb|fuck|sha)";
//        String message = "你sb,gun吧!";
//        message = message.replaceAll(regex,"***");
//        System.out.println(message);
    }
}















